package com.sky.orangehireserver.context;

import cn.hutool.system.UserInfo;

public class UserContextHolder {
    private static final ThreadLocal<UserInfo> currentUser = new ThreadLocal<>();

    public static void set(UserInfo value) {
        currentUser.set(value);
    }

    public static UserInfo get() {
        return currentUser.get();
    }

    public static void clear() {
        currentUser.remove();
    }
}
